home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text0568.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  1.9 KB  |  53 lines

  1. >>I don't think we should do any shortref magic.  The simplest thing
  2. >>(the way it works now) is that the two examples above are identical.
  3. >>I say this is fine.
  4. >
  5. >But it's a royal pain to implement! Doing full SGML newline processing
  6. >by the standard is quite involved (see the article by Eric Naggum
  7. >in comp.text.sgml about SGML and Records that I referenced in
  8. >an earlier message). For example, you can't just get rid of all
  9. >newlines immediately before or after tags, like it says in the
  10. >web: Only those right after a start tag (of a non-empty element),
  11. >right before an end tag,
  12. >or the ones on a line containing only comments and processing instructions.
  13. >Newlines around <P> tags, for example, _are_ reported.
  14. >
  15. >If we don't stick the SHORTREF magic in the DTD to force the
  16. >parser to report all newlines, we'll end up with countless hacks
  17. >at newline processing, none of which matches the standard, and
  18. >it'll be luck if any of them matches each other.
  19.  
  20. Not necessarily.  Carefully define which new-lines have to be ignored.
  21. This may yield something complex.  But then, you are still free to ignore
  22. more new-lines than that in several different places, thus reducing the
  23. problem.  In other words, it is up to the formatting program to decide
  24. how to interpret them.  If it decides to throw out a few more new-lines
  25. at the beginning or end of various data elements, life becomes much
  26. easier.
  27.  
  28. You might have countless hacks, but since formatters ar allowed to
  29. format things differently, does it matter?
  30.  
  31. Take this example:
  32.  
  33.   Here's some text<P>And some more text
  34.   <P>
  35.   And some final text.
  36.  
  37. SGML may say this:
  38.  
  39.   \nHere's some text
  40.   (P
  41.   )P
  42.   And some more text\n
  43.   (P
  44.   )P
  45.   \nAnd some final text.
  46.  
  47. But the formatter is still free to toss those new-lines at the beginning
  48. and end of each paragraph (and in fact it had better if you don't want
  49. a space at the beginning of your paragraphs).
  50.  
  51.      tom
  52.  
  53.